home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v10n17.arc
/
DESKEXT.RLZ
< prev
next >
Wrap
Text File
|
1991-09-25
|
783b
|
26 lines
' deskext.rlz
external "user" func GetDesktopWindow () as word
external "user" func GetWindowDC (word) as word
external "user" proc ReleaseDC (word, word)
external "gdi" func GetWindowExt (word) as dword
external "gdi" func GetWindowOrg (word) as dword
func LOWORD(dw)
return (dw mod 65536)
end func
func HIWORD(dw)
return (Floor(dw / 65536))
end func
hDesktop = GetDesktopWindow()
hDc = GetWindowDC(hDesktop)
ext = GetWindowExt(hDC)
org = GetWindowOrg(hDC)
Print "desktop window: ", LOWORD(org), HIWORD(org), LOWORD(ext), HIWORD(ext)
' if bail out before execute next line, eventually crash Windows:
' HDCs are a precious resource in WIndows; managing them in an interpreted
' environment (or in a debugger) is tricky.
ReleaseDC(hDesktop, hDC)